<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        body{
            margin:50px 15px;
        }
        article{
            border: 5px solid blueviolet;
            width: 500px;
            display: flex;
            flex-direction: column;
        }
        article div{
           width: 100px;
           height: 100px;
           /* 只显示内容区域 */
           background-clip: content-box;
           padding: 10px;
           /* 不让盒子被撑大 */
           box-sizing: border-box; 
           background-color: red;
           font-size: 35px;
        }
    </style>
</head>
<body>
    <article>
        <div>1</div>
        <div>2</div>
        <div>3</div>
    </article>
</body>
</html>